
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: inherit;
    color: inherit;
}

:root {

    /* 间距类 */
    --distance: 1rem;
    --half-distance: 0.5rem;
    --third-distance: 0.33rem;
    --fourth-distance: 0.25rem;

    font-size: 16px;
    /* 🎨 基础颜色 */
    --color-white: #ffffff;
    --color-black: #000000;
    --color-inverse: #111;
    --background-color: #f8f9fa;
    --secondary-background-color: #E8E8E8;
    --text-color: #333;
    --text-description: #565656;
    --subtle-text-color: #6c757d;
    --border-color: #686c71;
    --card-bg: #ffffff;
    --box-shadow: rgba(0, 0, 0, 0.08);

    --primary-color: #5a67d8; /* 深紫蓝色 */
    --primary-hover: #434fd9;
    --primary-light: #764ba2;

    --success-color: #28a745;
    --success-bg: #e6f9f0;
    --success-border: #b2f2cc;

    --warning-color: white;
    --warning-bg: #ffc107;
    --warning-border: #ffeac2;

    --danger-color: white;
    --danger-bg: #dc3545;
    --danger-border: #ffcccc;

    --info-color: #ffffff;
    --info-bg: #ff0000;
    --info-border: #c8e9e5;

    --gray-100: #f1f1f1;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #868e96;
    --gray-700: #495057;

    --button-bg: var(--primary-color);
    --button-text: #ffffff;
    --button-hover: var(--primary-hover);
    --button-disabled: #e9ecef;

    --bg-overlay: rgba(0, 0, 0, 0.5);
    /* 🔗 链接样式 */
    --link-color: var(--primary-color);
    --link-hover: #6677ef; /* 和主色协调的悬停色 */

    --z-index-level-1: 1;
    --z-index-level-2: 1000;
    --z-index-level-3: 9999;
}

/* 🌑 暗黑模式样式 */
body.dark-mode {
    /* 🖌️ 主题背景与文字 */
    --color-inverse: #fff;
    --background-color: #121212;
    --secondary-background-color: #3f3f3f;
    --text-color: #f0f0f0;
    --subtle-text-color: #999999; /* 略降低亮度，避免喧宾夺主 */
    --border-color: #c5bebe;
    --card-bg: #232323;
    --box-shadow: rgba(255, 255, 255, 0.05);

    /* 🔵 主色系（按钮/链接/强调） */
    --primary-color: #5a67d8; /* 更现代的亮紫蓝主色 */
    --primary-hover: #4f5cce; /* 悬停稍加深 */
    --primary-light: #764ba2;


    /* 🧱 中性灰色系 */
    --gray-100: #202020;
    --gray-200: #2a2a2a;
    --gray-300: #333333;
    --gray-400: #444444;
    --gray-500: #555555;
    --gray-600: #666666;
    --gray-700: #888888;

    /* 🎳 按钮样式 */
    --button-bg: var(--primary-color);
    --button-text: #ffffff;
    --button-hover: var(--primary-hover);
    --button-disabled: #555555;

    --bg-overlay: rgb(255, 255, 255, 0.2);
}

body {
    /*基础配置*/
    /*font-synthesis: none;*/
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

pre {
    width: 100%;
    overflow: scroll;
}
pre::-webkit-scrollbar{
    width: 8px;
    height: 8px;
    background-color: var(--background-color);
}
pre::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
}

@media screen and (max-width: 768px){
    pre::-webkit-scrollbar{
        width: 0;
        height: 0;
    }
    
}
/*自定义*/
.dot {
    position: absolute;
    top: 0;
    right: 0;
    transform: translateX(50%) translateY(-50%);
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: var(--info-bg);

}

/*阴影类*/
.shadow-black {
    box-shadow: 0 0 10px var(--box-shadow);
}

.gray-swatch,
.color-block {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* 按钮类 */
.button {
    background-color: var(--background-color);
    color: var(--text-color);
    cursor: pointer;
}

.button:hover {
    background-color: var(--secondary-background-color);
}

.button-primary {
    padding: 0.3rem 0.5rem;
    background-color: var(--button-bg);
    color: var(--button-text);
    cursor: pointer;
    border: 1px solid #ffffff;
    border-radius: 0.5rem;
}

.button-primary:hover {
    background-color: var(--button-hover);
}

body.dark-mode .button-primary {
    border: none;
}

.button-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    cursor: pointer;
}

.button-outline:hover {
    background-color: var(--primary-color);
    color: var(--button-text);
}

/* 鼠标悬停类 */
.hover-primary {
    background-color: var(--background-color);
    color: var(--text-color);
}

.hover-primary:hover {
    background-color: var(--primary-color);
    color: white;;
}


.hover-red:hover {
    color: #f00;
}

/*透明度类*/
.opacity-2-9 {
    opacity: 0.2;
}

.opacity-2-9:hover {
    opacity: 0.9;
}

.opacity-6-hover:hover {
    opacity: 0.6;
}

/* 徽章类 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 4px;
}

/* 链接类 */
.link-primary {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.link-primary:hover {
    color: var(--link-hover);
}

.link-gray {
    color: #ced4da;
    text-decoration: none;
}

.link-gray:hover {
    color: #eee;
}


.scroll-container {
    overflow-y: auto;
    overflow-x: auto;
    -ms-overflow-x: auto;
    -ms-overflow-y: auto;
    -ms-overflow-style: auto;
}

/* 滚动条整体样式 */
.scroll-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background-color: var(--background-color);
}

.scroll-container::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
}

@media screen and (max-width: 768px){
    .scroll-container::-webkit-scrollbar {
        width: 0;
        height: 0;
    }
    
}
/* 图片类 */
.img-cover {
    object-fit: cover;
}

.img-contain {
    object-fit: contain;
}

.img-fill {
    object-fit: fill;
}

/*表单类*/
.label {
    display: flex;
    align-items: center;
    margin-right: 0.6rem;
    margin-left: 0.2rem;
    font-size: 0.95rem;
}

.form-text-container {
    display: flex;
}

.input-text-container {
    position: relative;
    flex: 1;
}

.form-text-container input {
    flex: 1;
    padding: 0.2rem 1rem 0.2rem 0.4rem;
    outline: none;
    border: 1px solid #ccc;
    border-radius: 0.3rem;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
    transition: border 0.3s ease;
}

.form-text-container input:focus {
    border-color: var(--primary-color);
}

.input-text-container .close-icon {
    position: absolute;
    right: 0.5rem;
    bottom: 50%;
    transform: translateY(50%);
}

/* 覆盖自动填充样式 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text-color);
    box-shadow: 0 0 0 1000px var(--card-bg) inset; /* 如果你想要白色背景，改为 transparent 就是透明 */
}

/*响应式类*/
.hidden-768 {
}


/*圆角类*/
.radius-rem {
    border-radius: 1rem;
}

.radius-half-rem {
    border-radius: 0.5rem;
}

.radius-third-rem {
    border-radius: 0.33rem;
}

/*mouse type*/
.mouse-cursor {
    cursor: pointer;
}

.mouse-cursor-disable {
    cursor: not-allowed;
    opacity: 0.6;
}

/*旋转类*/
.rotate-90 {
    transform: rotateZ(90deg);
}


/* 背景颜色类 */
.bg-white {
    background-color: var(--color-white);
}

.bg-black {
    background-color: var(--color-black);
}

.bg-primary {
    background-color: var(--primary-color);
}

.bg-success {
    background-color: var(--success-bg);
}

.bg-warning {
    background-color: var(--warning-bg);
}

.bg-danger {
    background-color: var(--danger-bg);
}

.bg-card {
    background-color: var(--card-bg);
}

.bg-body {
    background-color: var(--background-color);
}

.bg-gray-100 {
    background-color: var(--gray-100);
}

.bg-gray-200 {
    background-color: var(--gray-200);
}

.bg-gray-300 {
    background-color: var(--gray-300);
}

.bg-gray-400 {
    background-color: var(--gray-400);
}

.bg-gray-500 {
    background-color: var(--gray-500);
}

.bg-gray-600 {
    background-color: var(--gray-600);
}

.bg-gray-700 {
    background-color: var(--gray-700);
}

.bg-transparent {
    background-color: transparent;
}

/* 边框类 */
.border-gray {
    border: 1px solid var(--border-color);
}

.border-vetical-gray {
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.border-horizontal-gray {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.border-primary {
    border: 2px solid var(--primary-color);
}

.margin-rem {
    margin: var(--distance);
}

.margin-half-rem {
    margin: var(--half-distance);
}

.margin-third-rem {
    margin: var(--third-distance);
}

.margin-fourth-rem {
    margin: var(--fourth-distance);
}

.margin-vetical {
    margin: var(--distance) 0;
}

.margin-half-vetical {
    margin: var(--half-distance) 0;
}

.margin-third-vetical {
    margin: var(--third-distance) 0;
}

.margin-fourth-vetical {
    margin: var(--fourth-distance) 0;
}

.margin-horizontal {
    margin: 0 var(--distance);
}

.margin-half-horizontal {
    margin: 0 var(--half-distance);
}

.margin-third-horizontal {
    margin: 0 var(--third-distance);
}

.margin-fourth-horizontal {
    margin: 0 var(--fourth-distance);
}


.padding-24rem {
    padding: 0.2rem 0.4rem;
}

.padding-28rem {
    padding: 0.2rem 0.8rem;
}

.padding-46rem {
    padding: 0.4rem 0.6rem;
}

.padding-rem {
    padding: var(--distance);
}

.padding-half-rem {
    padding: var(--half-distance);
}

.padding-third-rem {
    padding: var(--third-distance);
}

.padding-fourth-rem {
    padding: var(--fourth-distance);
}

.padding-vetical {
    padding: var(--distance) 0;
}

.padding-vetical {
    padding: var(--half-distance) 0;
}

.padding-third-vetical {
    padding: var(--third-distance) 0;
}

.padding-fourth-vetical {
    padding: var(--fourth-distance) 0;
}

.padding-horizontal {
    padding: 0 var(--distance);
}

.padding-half-horizontal {
    padding: 0 var(--half-distance);
}

.padding-third-horizontal {
    padding: 0 var(--third-distance);
}

.padding-fourth-horizontal {
    padding: 0 var(--fourth-distance);
}

.gap {
    gap: var(--distance);
}

.gap-half {
    gap: var(--half-distance);
}

.gap-third {
    gap: var(--third-distance);
}

.gap-fourth {
    gap: var(--fourth-distance);
}


/*容器类*/
.container {
    display: flex;
}

.container-column {
    display: flex;
    flex-direction: column;
}

.container-center {
    display: flex;
    justify-content: center;
}

.container-align-center {
    display: flex;
    align-items: center;
}

.container-align-content {
    display: flex;
    align-content: center;
}

.container-flex-start {
    display: flex;
    justify-content: flex-start;
}

.container-flex-end {
    display: flex;
    justify-content: flex-end;
}

.container-space-between {
    display: flex;
    justify-content: space-between;
}

.container-space-around {
    display: flex;
    justify-content: space-around;
}

.container-space-evenly {
    display: flex;
    justify-content: space-evenly;
}

.container-wrap {
    display: flex;
    flex-wrap: wrap;
}

.container-nowrap {
    display: flex;
    flex-wrap: nowrap;
}

.container-reverse {
    display: flex;
    flex-direction: row-reverse;
}

.container-column-reverse {
    display: flex;
    flex-direction: column-reverse;
}

.container-banner {
    width: 75vw;
}

.container-768-row-column {
    display: flex;
}

.container-flex-1 {
    flex: 1;
}

.container-flex-2 {
    flex: 2;
}

.container-flex-3 {
    flex: 3;
}

.container-w100 {
    width: 100%;
}

.container-h100 {
    height: 100%;
}

/* 背景颜色类 */
.bg-image-header {
    background: linear-gradient(to right, #1e40af, #4338ca);
}


/* 文字颜色类 */
.text-white {
    color: var(--color-white);
}

.text-black {
    color: var(--color-black);
}

.text-primary {
    color: var(--primary-color);
}

.text-description {
    color: var(--text-description);
}

.text-success {
    color: var(--success-color);
    background-color: var(--success-bg);
}

.text-warning {
    color: var(--warning-color);
    background-color: var(--warning-bg);
}

.text-danger {
    color: var(--danger-color);
    background-color: var(--danger-bg);
}

.text-info {
    color: var(--info-color);
    background-color: var(--info-bg);
}

.text-muted {
    color: var(--subtle-text-color);
}

.text-secondary {
    color: var(--text-color);
}

.text-inverse {
    color: var(--color-inverse);
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-gray {
    color: var(--subtle-text-color);
    background-color: var(--secondary-background-color);
}

.text-2rem {
    font-size: 2rem;
}

.text-15rem {
    font-size: 1.5rem;
}

.text-12rem {
    font-size: 1.2rem;
}

.text-08rem {
    font-size: 0.8rem;
}

.text-05rem {
    font-size: 0.5rem;
}

.text-03rem {
    font-size: 0.3rem;
}

/*文字样式类*/
.text-one-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-two-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.text-title {
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.2rem;
}

.text-hover-gray {
    color: var(--subtle-text-color)
}

.text-hover-gray:hover {
    color: var(--text-color);
    cursor: pointer;
}

.user-select-none {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.overlay {
    background-color: var(--bg-overlay);
}

/*响应式*/
@media screen and (max-width: 768px) {
    .container-banner {
        width: 100vw;
    }

    .hidden-768 {
        display: none;
    }

    .container-768-row-column {
        flex-direction: column;
    }
}


@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.card {
    transition: transform 0.2s;
}

.card-header {
    flex: 0 0 auto;
}

.card-body {
    flex: 1 1 auto;
}

.card-footer {
    flex: 0 0 auto;
}

.card-animation:hover {
    /*修改转动点为中心*/
    animation-name: up-down;
    animation-duration: 1s;
    animation-timing-function: ease-in-out;
}

@keyframes up-down {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px) rotateY(270deg);
    }
    100% {
        transform: translateY(0) rotateY(360deg);
    }
}

/* NavSection 样式 */
.back-button {
  display: flex;
  margin-bottom: 0.5rem;
  cursor: pointer;
  font-weight: bold;
}

.current-title {
  font-size: 1.1rem;
  font-weight: bold;
}

.section-nav {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.nav-link {
  display: block;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.4rem 0.4rem;
  transition: all 0.3s ease;
}
.nav-link.active {
  background-color: var(--primary-color);
  color: var(--color-white);
}

@media screen and (max-width: 768px) {
  .nav-section {
    width: 100%;
    max-width: 100vw;
  }
}